﻿namespace Yewan.Modbus
{
    /// <summary>
    /// 功能码
    /// </summary>
    public enum FunctionCode
    {
        /// <summary>
        /// 读取线圈状态
        /// </summary>
        ReadCoilStatus = 0x01,

        /// <summary>
        /// 读取输入线圈
        /// </summary>
        ReadInputCoils = 0x02,

        /// <summary>
        /// 读取保持寄存器
        /// </summary>
        ReadHoldingRegisters = 0x03,

        /// <summary>
        /// 读取输入寄存器
        /// </summary>
        ReadInputRegisters = 0x04,

        /// <summary>
        /// 写入单个线圈
        /// </summary>
        WriteSingleCoil = 0x05,

        /// <summary>
        /// 写入单个寄存器
        /// </summary>
        WriteSingleRegister = 0x06,

        /// <summary>
        /// 写入多线圈
        /// </summary>
        WriteMultipleCoils = 0x0F,

        /// <summary>
        /// 写入多个寄存器
        /// </summary>
        WriteMultipleRegisters = 0x10,
    }
}
